<%*
const clean = (value) => (value || "").replace(/\r?\n/g, " ").trim();
const yaml = (value) => clean(value).replace(/"/g, '\"');
const fileSafe = (value) => clean(value)
.replace(/[\/:*?"<>|#^[]]/g, "")
.replace(/\s+/g, " ")
.slice(0, 120)
.trim();
const paperTitle = clean(await tp.system.prompt("Paper title or topic", tp.file.title));
const topic = clean(await tp.system.prompt("Topic / field", ""));
const paperUrl = clean(await tp.system.prompt("Paper URL", ""));
const pdf = clean(await tp.system.prompt("PDF wikilink or file name", ""));
const venue = clean(await tp.system.prompt("Venue", ""));
const year = clean(await tp.system.prompt("Year", ""));
const status = await tp.system.suggester(["draft", "reading", "completed"], ["reading", "draft", "completed"], false, "Status");
const noteTitle = ${paperTitle || topic || "Untitled"} To Understand List;
await tp.file.rename(fileSafe(noteTitle) || "To Understand List");
-%>
title: "<% yaml(noteTitle) %>"
created: <% tp.date.now("YYYY-MM-DD HH:mm") %>
type: paper-reading
status: <% status %>
tags:
- paper-reading
- to-understand
paper_title: "<% yaml(paperTitle) %>"
paper_url: "<% yaml(paperUrl) %>"
pdf: "<% yaml(pdf) %>"
venue: "<% yaml(venue) %>"
year: "<% yaml(year) %>"
topic: "<% yaml(topic) %>"
reading_stage: to-understand
<% noteTitle %>
- Paper / topic: <% paperTitle %>
- Paper: <% paperUrl %>
- PDF: 论文.pdf
- Topic: <% topic %>
Priority Queue
Terms
Metrics
Resolved Notes